package com.cssl.controller;

import com.cssl.feinclient.GoodsClient;
import com.cssl.pojo.Goods;
import com.cssl.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class GoodsController {

    @Autowired
    private GoodsClient client;

    @GetMapping("/bxx/index_findAll")
    public List<Goods> findAll(){
        return client.findAll();
    };
    @GetMapping("/bxx/index_findByType")
    public List<Goods> findByType(Integer t_id){
        System.out.println("findByType:"+t_id);
        return client.findByType(t_id);
    };
    @GetMapping("/bxx/index_findById")
    public Goods findById(Integer gid){
        return client.findById(gid);
    };

}
